Call Appearance Messages
The following bit masks specify the messages that the Telephone Manager passes to your application for a given call appearance activity. You also use these constants when you callTELCAMsgHand
to specify which messages you want your message handler to receive.When your call appearance message handler receives a message, the
hTELCA
parameter is a handle to the call appearance structure for the call appearance that originated the message. Themsg
parameter is one of the following constants. Theglobals
parameter is the value you specified when you called theTELDNMsgHand
function to register the message handling routine. The other parameters vary in meaning according to the message type.
enum { telCAAlertingMsg = 0x00000001, telCAOfferMsg = 0x00000002, telCAProgressMsg = 0x00000004, telCAOutgoingMsg = 0x00000008, telCADisconnectMsg = 0x00000010, telCAActiveMsg = 0x00000020, telCAConferenceMsg = 0x00000040, telCATransferMsg = 0x00000080, telCAHoldMsg = 0x00000100, telCADigitsMsg = 0x00000200, telCACallParkMsg = 0x00000400, telCACallbackMsg = 0x00000800, telCARejectMsg = 0x00001000, telCADeflectMsg = 0x00002000, telCAForwardMsg = 0x00004000, telCAConferenceSplitMsg = 0x00008000, telCAConferenceDropMsg = 0x00010000, telCAQueuedMsg = 0x00020000, telCAInUseMsg = 0x00040000, telCACallPickupMsg = 0x00080000, telCAPagingMsg = 0x00100000, telCAIntercomMsg = 0x00200000, telCAModemToneMsg = 0x00400000, telCAFaxToneMsg = 0x00800000, telCAIdleMsg = 0x01000000, telCASuccessiveAlertMsg = 0x02000000, telCAUserUserInfoMsg = 0x04000000, telCAHandOffMsg = 0x08000000, telCAVoiceDetectedMsg = 0x10000000, telCASilenceDetectedMsg = 0x20000000, telCADigitsImmMsg = 0x40000000, telCAOtherMsg = 0x80000000, telAllCAMsgs = 0x7fffffff };Constant descriptions
telCAAlertingMsg
- Your application receives this message when an incoming call is alerting (that is, ringing) at a telephone terminal. In response, you can call the
TELAnswerCall
function to answer the call. Themtype
parameter is not used and is set to 0. Thevalue
parameter is a constant that indicates the alerting pattern of the incoming call. The possible values for this constant are described in "Alerting Patterns" on page 2-15. ThemsgInfo
parameter is not used and is set to 0.telCAOfferMsg
- Your application receives this message when an incoming call is being offered to the local terminal. You can call the
TELAcceptCall
function to accept the call. At that point, the call enters thetelCAAlertingState
state and your call appearance message handler gets thetelCAAlertingMsg
message. You can then callTELAnswerCall
function to answer the call. Alternatively, you can callTELRejectCall
to reject the offered call. Themtype
,value
, andmsgInfo
parameters are not used and are set to 0.telCAProgressMsg
- Your application receives this message when there is a change in the status of an outgoing call appearance. If the
progressHasDuration
bit in theotherFeatures
field of the call appearance record is set, then themType
parameter may contain a duration value, expressed in milliseconds. If the duration value is unknown, if it is not meaningful with a given call progress signal, or if theprogressHasDuration
bit is not set,mType
contains 0. Thevalue
parameter is a constant that indicates the current state of the outgoing call appearance. See "Call Progress Signals" on page 5-30 for a description of the constants that can be passed in this parameter. If thevalue
parameter contains the constanttelCAPUpdate
, the Telephone Manager updates thermtDN
,rmtPartyName
, andrmtSubaddress
fields in the call appearance structure referenced by thehTELCA
parameter. If thevalue
parameter contains the constanttelCAPRouted
, the Telephone Manager updates therouteDN
,routePartyName
, androuteSubaddress
fields in the call appearance structure referenced by thehTELCA
parameter. ThemsgInfo
parameter contains a pointer to a call appearance generic message structure (page 5-44). If thevalue
parameter containstelCAPUpdate
, the information in the structure applies to the updated remote directory number, if this information is available. Ifvalue
containstelCAPRouted
, the information applies to the directory number to which the call was routed. Otherwise, the structure is 0-filled.telCAOutgoingMsg
- Your application receives this message when an outgoing call appearance has been initiated (perhaps in response to your calling
TELConnect
orTELDialDigits
). Themtype
parameter is not used and is set to 0. Thevalue
parameter is a constant that indicates whether the call was initiated manually or programmatically. The possible values for this constant are described in "Outgoing Origination States" on page 5-41. If thevalue
parameter istelPhysical
, the call appearance structure specified by thehTELCA
parameter is a new structure just allocated by the Telephone Manager. Ifvalue
istelProgrammatic
and your application initiated the telephone call, the handle is identical to the handle returned by theTELSetupCall
function. (If your application does not recognize the handle, another application initiated the call). Your application can find out the destination number and name by inspecting the structure specified by thehTELCA
parameter. ThemsgInfo
parameter is not used and is set to 0.telCADisconnectMsg
- Your application receives this message when a call has been disconnected. In response, you should dispose of the call appearance structure specified by the
hTELCA
parameter. Themtype
parameter is a constant that indicates whether the local party or the remote party terminated the connection. The constants are described in "Disconnect Location Messages" (page 5-37). Thevalue
parameter is a constant that indicates the reason for the disconnect. The possible values for this constant are described in "Disconnect Types" on page 5-37. ThemsgInfo
parameter is not used and is set to 0.telCAActiveMsg
- Your application receives this message when a call appearance has been successfully connected to the destination and conversation or data is free to flow over the connection. The
mtype
,value
, andmsgInfo
parameters are not used and are set to 0. Note that a telephone tool might automatically send atelCAActiveMsg
message after theTELConnect
orTELDialDigits
function completes successfully, without knowing if a connection is actually established.telCAConferenceMsg
- Your application receives this message when (1) you call the
TELConferencePrep
function to establish a connection with a party to be added to a conference; (2) you call theTELConferenceEstablish
function to add a new party to a conference; or (3) the user manually sets up a conference. Themtype
parameter is unused and is set to 0. Thevalue
parameter contains a constant that indicates the success or failure of an attempt to prepare for and establish a conference. See "Conference Activity States" on page 5-34 for the constants you can receive in this parameter. ThemsgInfo
parameter is a pointer to a call appearance conference message structure (page 5-44). If thevalue
parameter containstelConferenceEst
ortelConferenceEstFailed
, the structure'srelatedCA
field contains a handle to the call appearance structure of the conference initiator. Otherwise, therelatedCA
field containsnil
.telCATransferMsg
- Your application receives this message when (1) you call the
TELTransferPrep
,TELTransferEstablish
, orTELTransferBlind
function to transfer a call; (2) a user manually transfers a call; or (3) a call originated by your application is transferred by the remote end. Themtype
parameter is unused and is set to 0. Thevalue
parameter contains a constant that indicates the outcome of the transfer activity. See "Transfer Constants" on page 5-43 for the constants you can receive in this parameter. ThemsgInfo
parameter is a pointer to a call appearance transfer message structure (page 5-45). If thevalue
parameter containstelTransferEst
ortelTransferFailed
, the structure'sprepCA
field contains a handle to the prepared call appearance structure and thermtDN
,rmtName
, andrmtSubaddress
fields specify the directory number, user, and subaddress to which the call is to be or has been transferred. Otherwise, the fields of the message structure are set to 0.telCAHoldMsg
- Your application receives this message when (1) you call the
TELHold
orTELRetrieve
function to hold or retrieve a call appearance, or (2) a user manually puts a call on hold or retrieves a held call. Themtype
parameter is unused and is set to 0. Thevalue
parameter contains a constant that indicates the outcome of the hold activity. See "Hold States" on page 5-39 for the constants you can receive in this parameter. ThemsgInfo
parameter is unused and is set to 0.telCADigitsMsg
- Your application receives this message when a key is pressed at a remote directory number. (Key presses on a local terminal are handled by your terminal message handler.) The
mtype
parameter is a constant that indicates whether or not the key press generated an audible tone. These constants are described in "Audible Digit States" (page 5-33). Thevalue
parameter is the ASCII character for the keypad digit (0-9, #, *) pressed by the remote party. ThemsgInfo
parameter is unused and is set to 0. Note that bothtelCADigitsMsg
andtelCADigitsImmMsg
messages are sent for each remote keypress; your application must make sure to respond to only one of each pair of messages. The Telephone Manager immediately calls your message handler with thetelCADigitsImmMsg
message, whereas it queues thetelCADigitsMsg
message to be sent at system-task time. See page 5-25 for further information abouttelCADigitsImmMsg
.telCACallParkMsg
- Your application receives this message when (1) you call the
TELParkCall
orTELRetrieveParkedCall
function to park a call or retrieve a parked call, or (2) a user manually parks or retrieves a call. Themtype
parameter is unused and is set to 0. Thevalue
parameter contains a constant that indicates the outcome of call parking activity. The constants are listed in "Call Parking States" (page 5-42). ThemsgInfo
parameter is a pointer to a call appearance generic message structure (page 5-44) that specifies the remote directory number at which the call is available for retrieving. If the telephone network switch doesn't support parking calls against directory numbers, all fields of that structure contain 0.telCACallbackMsg
- Your application receives this message when there is callback activity for a call appearance--that is when (1) your application calls the
TELCallbackSet
function in response to either a busy signal or no answer at the destination number (thevalue
parameter containstelCallbackEst
ortelCallbackFailed
); (2) a previously busy destination number becomes available (thevalue
parameter containstelCallbackNowAvail
); (3) your application calls theTELCallbackClear
function to clear a callback request, regardless of whether the request originated at the local terminal or a remote terminal (thevalue
parameter containstelCallbackCleared
); (4) a remote application calls theTELCallbackSet
function because a local directory number did not answer (thevalue
parameter containstelCallbackDesired
); (5) a remote application calls theTELCallbackClear
function to clear a callback desired request, regardless of whether the request originated at the local terminal or a remote terminal (thevalue
parameter containstelCallbackDesiredCleared
); or (6) a local or a remote user manually sets or clears a callback request. Thevalue
parameter contains a constant that indicates the type of callback activity. The constants are described in "Callback Activity Types" (page 5-33). If thevalue
parameter containstelCallbackNowAvail
, thehTELCA
parameter is unused and is set to 0. If thevalue
parameter containstelCallbackNowAvail
,telCallbackDesired
ortelCallbackDesiredCleared
, and if a callback reference value is used by the switch, thenmtype
contains a valid callback reference. Otherwise,mtype
contains 0. ThemsgInfo
parameter is a pointer to a call appearance generic message structure (page 5-44). If thevalue
parameter containstelCallbackEst
,telCallbackFailed
ortelCallbackCleared
, that structure specifies the remote directory number and name to which the callback request applies. If thevalue
parameter containstelCallbackNowAvail
, that structure specifies the remote directory number and name to be called back. If thevalue
parameter containstelCallbackDesired
ortelCallbackDesiredCleared
, that structure specifies the remote directory number and name that wants a return call.telCARejectMsg
- Your application receives this message when (1) you call the
TELRejectCall
function to reject a call; (2) a user manually rejects a call; or (3) a call originated by your application is rejected by the remote end. Themtype
parameter is unused and is set to 0. Thevalue
parameter contains a constant that indicates the type or outcome of call rejection activity. The constants are described in "Call Rejection States" (page 5-43). ThemsgInfo
parameter is unused and is set to 0.telCADeflectMsg
- Your application receives this message when (1) you call the
TELDeflectCall
function to deflect an incoming call; (2) a user manually deflects an incoming call; (3) call forwarding is in effect for the local directory number and an incoming call is automatically deflected as a result; or (4) the remote party deflects your outgoing call to a new directory number. Themtype
parameter is unused and is set to 0. Thevalue
parameter contains a constant that indicates the type and outcome of call-deflect activity. The constants are described in "Call Deflect Messages" (page 5-36). ThemsgInfo
parameter is a pointer to a call appearance generic message structure (page 5-44). The information in the structure applies to the remote directory number to which the call is being deflected.telCAForwardMsg
- Your application receives this message when a call that you originated is forwarded by the remote party to another directory number. The
mtype
parameter is unused and is set to 0. Thevalue
parameter contains a constant that indicates type of call forwarding in effect at the remote number. The constants are described in "Call Forward Types and States" (page 5-28). ThemsgInfo
parameter is a pointer to a call appearance generic message structure (page 5-44). The information in the structure applies to the remote directory number to which the call is being forwarded.telCAConferenceSplitMsg
- Your application receives this message when it calls the
TELConferenceSplit
function to split a conference call. Themtype
parameter is unused and is set to 0. Thevalue
parameter contains a constant that indicates whether the call appearance was successfully split from the conference. The constants are described in "Conference Split States" (page 5-36). ThemsgInfo
parameter is a pointer to a call appearance conference message structure (page 5-44) whoserelatedCA
field contains a handle to the call appearance structure of the conference initiator.telCAConferenceDropMsg
- Your application receives this message when it calls the
TELDrop
function to drop a call appearance from a conference. Themtype
parameter is unused and is set to 0. Thevalue
parameter contains a constant that indicates whether the call appearance was successfully dropped from the conference. The constants are described in "Conference Drop States" (page 5-35). ThemsgInfo
parameter is a pointer to a call appearance conference message structure (page 5-44) whoserelatedCA
field contains a handle to the call appearance structure of the conference initiator.telCAQueuedMsg
- Your application receives this message when an incoming call is queued to be answered. In response, your application should call either
TELAcceptCall
orTELRejectCall
to accept or reject the call. Themtype
,value
, andmsgInfo
parameters are not used and are set to 0.telCAInUseMsg
- Your application receives this message when an incoming call to a multiple-access directory number (MADN) is in use, but at another terminal. The
mtype
andmsgInfo
parameters are not used and are set to 0. Thevalue
parameter is a constant that provides additional information about the call appearance. The constants are described in "MADN In-Use States" (page 5-41).telCACallPickupMsg
- Your application receives this message when (1) you call the
TELCallPickup
function to pick up a call alerting at a different terminal; (2) a call originated by your application is picked up at the remote end at a directory number other than the one you specified; or (3) a user manually picks a call alerting at a different terminal. Themtype
parameter is unused and is set to 0. Thevalue
parameter contains a constant that indicates the outcome of the call pickup activity. The constants are listed in "Call Pickup States" (page 5-42). ThemsgInfo
parameter is a pointer to a call appearance generic message structure (page 5-44). If thevalue
parameter containstelCallPickupEst
ortelCallPickupFailed
, the information in the structure refers to the directory number whose call is to be picked up. Ifvalue
containstelCallPickedUp
, the information applies to the remote directory number at which the call was picked up.telCAPagingMsg
- Your application receives this message when (1) you call the
TELPaging
function to access a paging feature for a call appearance, or (2) a user manually initiates a page. Themtype
parameter is a paging ID if the telephone system requires one; otherwise,mtype
is 0. Thevalue
parameter is a constant that indicates the outcome of the paging activity. The constants are described in "Paging States" (page 5-40). ThemsgInfo
parameter is not used and is set to 0.telCAIntercomMsg
- Your application receives this message when (1) you call the
TELIntercom
function to access an intercom feature for a call appearance, or (2) a user manually initiates intercom activity. Themtype
parameter is an intercom ID if the telephone system requires one; otherwise,mtype
is 0. Thevalue
parameter is a constant that indicates the outcome of the intercom activity. The constants are listed in "Intercom States" (page 5-40). ThemsgInfo
parameter is not used and is set to 0.telCAModemToneMsg
- Your application receives this message when a modem tone activity has occurred. The
mtype
parameter is not used and is set to 0. Thevalue
parameter is a constant that indicates whether a modem tone has been detected or if it has ceased. The constants are listed in "Modem Tone States" (page 5-39). ThemsgInfo
parameter is not used and is set to 0.telCAFaxToneMsg
- Your application receives this message when a fax tone activity has occurred. The
mtype
parameter is not used and is set to 0. Thevalue
parameter is a constant that indicates whether a fax tone has been detected or if it has ceased. The constants are listed in "Fax Tone States" (page 5-39). ThemsgInfo
parameter is not used and is set to 0.telCAIdleMsg
- Your application receives this message when a call appearance reverts to the idle state (
telCAIdleState
). This can happen when (1) you call theTELDrop
function to drop a call; (2) you call theTELRejectCall
function to reject a call; (3) you call theTELDeflectCall
function to deflect a call; (4) you call theTELTransferEstablish
orTELTransferBlind
function to transfer a call; or (5) a user manually hangs up the phone. Themtype
,value
, andmsgInfo
parameters are not used and are set to 0. After getting this message, you should dispose of the handle to the call appearance structure. It is recommended that you do not reuse a call appearance structure. Note that you do not get an idle message when a new call appearance is created, even though its starting state is the idle state.telCASuccessiveAlertMsg
- Your application receives this message each time an incoming call rings at the terminal. The
mtype
,value
, andmsgInfo
parameters are not used and are set to 0.telCAUserUserInfoMsg
- Your application receives this message if the remote end sends user-to-user information at setup or disconnect time. (Not all switches support user-to-user information.) The
mtype
andvalue
parameters are not used and are set to 0. ThemsgInfo
parameter is a pointer to a call appearance user-to-user information message structure (page 5-46) containing user-to-user information.telCAHandOffMsg
- Your application receives this message when you have registered to receive auto-answered calls (by calling the
TELDNSetAutoAnswer
function) and an incoming call is auto-answered. When your application gets this message, it is in control of the call and can do whatever is appropriate. For example, you might play a recording telling the caller to leave a message or put the call on a speakerphone. Themtype
parameter is a Boolean value that indicates whether the call was answered on the call saver ring count. (The Call Saver feature refers to the ability to auto-answer a call on a greater or lesser number of rings, depending on certain conditions, such as the existence of voice mail messages.) This parameter containstrue
if the call was answered on toll-saver rings. Otherwise, it containsfalse
. Thevalue
parameter is a Boolean value that indicates whether or not voice has been detected in the incoming call. This parameter containstrue
if voice was detected. Otherwise, it containsfalse
. ThemsgInfo
parameter is not used and is set to 0.telCAVoiceDetectedMsg
- Your application receives this message when you have previously called the
TELCAVoiceDetect
function to activate voice detection and a telephone tool subsequently detects voice on the line. You can use this message to smoothly handle a situation in which the remote party answers a call before you are notified that the call is ringing at the remote end. Themtype
,value
, andmsgInfo
parameters are not used and are set to 0. Not all telephone tools support this message.telCASilenceDetectedMsg
- Your application receives this message when you have previously called the
TELCASilenceDetect
function to activate silence detection and a telephone tool subsequently detects silence on the line. Thevalue
parameter contains the period of time, expressed in seconds, during which silence was detected on the telephone line. Themtype
andmsgInfo
parameters are not used and are set to 0. Not all telephone tools support this message.telCADigitsImmMsg
- Your application receives this message when a key is pressed at a remote directory number. (Key presses on a local terminal are handled by your terminal message handler.) This message conveys the same information as the
telCADigitsMsg
message (page 5-19), but it is sent to your message handler immediately instead of at system-task time. As a result, your message handler might be called at interrupt time with atelCADigitsImmMsg
message. Note that bothtelCADigitsMsg
andtelCADigitsImmMsg
messages are sent for each remote keypress; your application must make sure to respond to only one of each pair of messages. Getting this message at interrupt time allows your application to more easily implement features involving recording and playing sounds using the Sound Manager. For example, you can implement an answering machine feature that allows a remote caller to skip the recorded greeting and leave a voice message immediately when the caller presses a key that you specify. In this case, you need to be informed of the key press immediately so you can stop playing the greeting and capture the voice message.telCAOtherMsg
- Your application receives this message when a telephone tool needs to send it some information about a call appearance that cannot be provided by the other call appearance messages. The values passed in the
mtype
,value
, andmsgInfo
parameters are defined by the telephone tool.telAllCAMsgs
- All call appearance events except
telCAOtherMsg
.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help